<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学科岗位分析</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
    <!--    error-->
    <div th:if="${error}" class="alert alert-danger" role="alert">
        <strong>错误!</strong><span th:text="${errorMsg}"></span>
    </div>
    <h1 th:if="${changCi}" th:text="${changCi.name}"></h1>
    <h2>学科-学段-岗位：数据统计</h2>
    <!--  工具栏-->
    <div class="row">
        <div class="col-md-6">
            统计时间：<span th:if="${sTime}" th:text="${#temporals.format(sTime, 'yyyy-MM-dd HH:mm')}"></span>
        </div>
        <div class="col-md-6 text-right">
            <a th:href="@{/job/statistics/subject-stage/reset(changCiId=${changCi.id})}" class="btn btn-success">重新统计</a>
            <a th:href="@{/job/list(changCiId=${changCi.id})}" class="btn btn-default">返回岗位列表</a>
        </div>
    </div>
    <table class="table table-bordered table-striped">
        <thead>
        <tr class="text-center">
            <th>序号</th>
            <th>学科</th>
            <th>小学</th>
            <th>初中</th>
            <th>义务教育</th>
            <th>高中</th>
            <th>中职</th>
            <th>学科合计</th>
        </tr>
        </thead>
        <tbody>
        <tr class="text-center" th:if="${ssjsList}" th:each="ssjs, ssjsStat : ${ssjsList}">
            <td th:text="${ssjsStat.index + 1}"></td>
            <td th:text="${ssjs.subject}"></td>
            <td th:text="${ssjs.primaryJobCount == 0 ? '' : ssjs.primaryJobCount}"></td>
            <td th:text="${ssjs.juniorHSJobCount == 0 ? '' : ssjs.juniorHSJobCount}"></td>
            <td th:text="${ssjs.compulsoryEdJobCount == 0 ? '' : ssjs.compulsoryEdJobCount}"></td>
            <td th:text="${ssjs.seniorHSJobCount == 0 ? '' : ssjs.seniorHSJobCount}"></td>
            <td th:text="${ssjs.vocationalJobCount == 0 ? '' : ssjs.vocationalJobCount}"></td>
            <td th:text="${ssjs.totalJobCount}"></td>
        </tr>
        <tr class="text-center" th:if="${ssjsList}">
            <td colspan="2" class="text-center">学段合计</td>
            <td th:text="${primarySum}"></td>
            <td th:text="${juniorSum}"></td>
            <td th:text="${compulsorySum}"></td>
            <td th:text="${seniorSum}"></td>
            <td th:text="${vocationalSum}"></td>
            <!--红色显示总合计-->
            <td style="color: red;font-weight: bold" th:text="${totalSum}"></td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>